package example.json.msg.util;

public class ErrorCodeUtil {

    //OnlineOffline 线上线下
    public static String onlineMsg(String errorCode){
        switch(errorCode) {
            case "0":
                return "成功";
            case "1001":
                return "userId不能为空";
            case "1002":
                return "用户不合法";
            case "1003":
                return "ip不能为空";
            case "1004":
                return "ip校验失败";
            case "1005":
                return "md5password不能为空";
            case "1006":
                return "md5password错误";
            case "1007":
                return "action不能为空";
            case "1008":
                return "手机号码不能为空或者手机号码位数不正确";
            case "1009":
                return "扩展必须为数字";
            case "10010":
                return "自带msgid不是长整形或者超过长整型的表数范围";
            case "10011":
                return "内容为空";
            case "10012":
                return "内容含关键字";
            case "10013":
                return "内容超过最大长度670";
            case "10014":
                return "签名超长或为空，签名最长为16, 内容以【开头";
            case "10015":
                return "action参数错误";
            case "10016":
                return "余额不足";
            case "10017":
                return "账号已禁用";
            case "10018":
                return "该用户此时间段禁止提交";
            case "10019":
                return "不允许主动获取和主动推送同时调用";
            case "10020":
                return "短信格式错误（JSON解析错误或手机号都不合法）";
            case "10021":
                return "短信打包超过500条";
            default:
                return "未知错误";
        }
    }

    //OnlineOffline 线上线下
    public static String dahanMsg(String errorCode){
        switch(errorCode) {
            case "0":
                return "提交成功";
            case "1":
                return "账号无效";
            case "2":
                return "密码错误";
            case "3":
                return "msgid太长，不得超过64位";
            case "4":
                return "错误号码/限制运营商号码";
            case "5":
                return "手机号码个数超过最大限制";
            case "6":
                return "短信内容超过最大限制";
            case "7":
                return "扩展子号码无效";
            case "8":
                return "定时时间格式错误";
            case "14":
                return "手机号码为空";
            case "19":
                return "用户被禁发或禁用";
            case "20":
                return "ip鉴权失败";
            case "21":
                return "短信内容为空";
            case "24":
                return "无可用号码";
            case "25":
                return "批量提交短信数超过最大限制";
            case "98":
                return "系统正忙";
            case "99":
                return "消息格式错误";
            default:
                return "未知错误";
        }
    }

    //guodu 国都
    public static String guoduMsg(String errorCode){
        switch(errorCode) {
            case "00":
                return "批量短信提交成功";
            case "01":
                return "个性化短信提交成功";
            case "02":
                return "IP验证失败";
            case "03":
                return "单条短信提交成功";
            case "04":
                return "用户名错误";
            case "05":
                return "密码错误";
            case "06":
                return "参数有误";
            case "07":
                return "SendTime格式错误";
            case "08":
                return "短信内容为空";
            case "09":
                return "手机号码为空";
            case "10":
                return "AppendID格式错误";
            case "-1":
                return "提交异常";
            default:
                return "未知错误";
        }
    }
}
